/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: jse2302 - Str1
 * <p>Powered by webrx On 2023-06-19 14:27:22
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Str1 {
    public static void main(String[] args) {
        //java.lang.String 类 是不可变的。
        String str = "hello";
        System.out.println(str);
        str += "ok";
        System.out.println(str);
        str = "java中文";
        System.out.println(str);

        // \转义
        String s2 = "he\bl\nl\to,'java'。\"ok\"";
        System.out.println(s2);


        String s4 = " hello\n" +
                "                \n" +
                "                \n" +
                "                java \"程序设计\"\n" +
                "                ";

        System.out.println(s4);

        //块级字符串
        String s3 = """
                hello
                
                
                java \"程序设计\"
                
                """;
        System.out.println(s3);
    }
}
